home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-15 / vtp191.zip / VIDTP191.DOC < prev    next >
Text File  |  1991-12-12  |  52KB  |  1,108 lines

  1.  
  2.  
  3.        VIDTYPE  Ver 1.91    Copyright 1991 by SERVITEK SOFTWARE.
  4.        _________________    All rights reserved.
  5.  
  6.  
  7.        If you find this useful, a $5 contribution would be appreciated.
  8.        Please send it to:  CHANGE OF ADDRESS!
  9.  
  10.                         NEW ADDRESS:               (OLD ADDRESS:     )
  11.                         SERVITEK SOFTWARE          (Vince Deegan     )
  12.                         PO BOX 280581              (PO BOX 180114    )
  13.                         Dallas, TX  75228-9181     (Dallas, TX  75218)
  14.  
  15.                                                             Thank you
  16.  
  17.        For local area networks, a licensing fee is $100 per file
  18.        server.
  19.  
  20.        Please refer to ORDER.FRM for a description of the license and
  21.        for ordering.
  22.  
  23.        VIDTYPE is a utility that detects the type of video-adapter, row
  24.        and column mode, system type (IBM PC/XT/AT/PS2), CPU type, DOS-
  25.        version, keyboard type, disk types/sizes, and environmet space
  26.        that you are using and automatically sets up DOS environment
  27.        variables or an errorlevel that represents the description of
  28.        those equipment types.  This should work with %100 clones, also.
  29.        In a DOS batch file, a DOS environment variable can be examined
  30.        when using the IF statement with the % symbol at each end of the
  31.        variable.  An errorlevel can be checked when using the IF and
  32.        ERRLORLEVEL statements.  NOTE:  Any DOS variable can be deleted
  33.        from the DOS environment by using DOS's SET command.  By typing
  34.        SET, the variable name, and the = sign, that variable will be
  35.        deleted. I.e. SET <variable>=
  36.  
  37.        One good use of VIDTYPE is when you want to run applications that
  38.        give you a selection of video-driver-files or set-files and you
  39.        want to have the necessary video-driver-file or set-file chosen
  40.        automatically before calling the application.  In other words,
  41.        you can write a batch file that uses the DOS-batch-language IF
  42.        statement and either the % symbol or ERRORLEVEL statement to
  43.        examine the DOS environment variable and/or errorlevel created by
  44.        VIDTYPE.  Then, depending on which IF statement is true, the
  45.        batch file can copy the needed video-driver-file or set-file to
  46.        the default driver-file or set-file used by the application.
  47.  
  48.        In some cases, using a DOS variable can interfere with some DOS
  49.        operations that depend on the use of the DOS environment space.
  50.        If this ever occurs with you, you can choose to refrain from
  51.        using DOS variables and, instead, use an errorlevel to detect the
  52.        type of equipment being used.
  53.  
  54.        Make this choice carefully, though, since the advantage to using
  55.        a DOS variable as opposed to an errorlevel is that it only needs
  56.        to be set once and VIDTYPE only needs to be called once at the
  57.        start-up of your system, within the autoexec.bat file.  The
  58.        errorlevel, on the other hand, needs to be checked immediately
  59.        after VIDTYPE is executed requiring VIDTYPE to be called in each
  60.        batch file that determines a video-driver-file or set-file for an
  61.        application.  That's not all that bad, but remember also, when
  62.        using an errorlevel, your batch files can become pretty lengthy
  63.        if you are going to test for all of the possible choices of
  64.        equipment.
  65.  
  66.        The use of DOS variables allows you ways of writing smaller and
  67.        more clever batch files.  So my suggestion would be always to
  68.        choose the use of a DOS variable unless you have problems with
  69.        your DOS environment space, such as when using very large batch
  70.        files whose pointers are kept in the DOS environment space or
  71.        when using hardware that isn't hardware-compatible with IBM.
  72.  
  73.        NOTE:  THIS VERSION HAS A DIFFERENT NUMBERING SEQUENCE THAN THAT
  74.        OF VERSION 1.6 OR EARLIER VERSIONS, FOR ERRORLEVELS.  IF YOU HAVE
  75.        USED THESE PREVIOUS VERSIONS OF VIDTYPE, YOU MUST MAKE THE
  76.        NECCESSARY CHANGES TO ANY OF YOUR PREVIOUS BATCH FILES THAT
  77.        DEPEND ON THESE ERRORLEVELS.  ALSO, THE SYSTEM-TYPE DOS VARIABLE
  78.        CALLED "SYSTEM" (IN THESE PREVIOUS VERSIONS) HAS BEEN CHANGED TO
  79.        "SYS".  YOU MAY GET A PRINTOUT OF THE NEEDED CHART BY TYPING
  80.        VIDTYPE NP > PRN.
  81.  
  82.  
  83.        Format:  (Using DOS variables)
  84.  
  85.                 VIDTYPE [Variable name] [-V] [-RC] [+RC] [+S] [+P] [+SYS] 
  86.                         [+CPU] [+VER] [+SV] [+KBD] [+ENV] [+TENV] [+DRVA]
  87.                         [+DRVB] [+DRVC] [+DRVD] [DEBUG]
  88.  
  89.  
  90.        Format:  (Using errorlevels)
  91.  
  92.                 VIDTYPE [+E] [-V] [-RC] [+RC] [+P] [DEBUG]
  93.  
  94.             OR  VIDTYPE [+E] [+SYS] [+CPU] [DEBUG]
  95.  
  96.             OR  VIDTYPE [+E] [+VER] [DEBUG]
  97.  
  98.             OR  VIDTYPE [+E] [+KBD] [DEBUG]
  99.  
  100.             OR  VIDTYPE [+E] [+ENV] [DEBUG]
  101.  
  102.             OR  VIDTYPE [+E] [+TENV] [DEBUG]
  103.  
  104.             OR  VIDTYPE [+E] [+DRVA] [DEBUG]
  105.  
  106.             OR  VIDTYPE [+E] [+DRVB] [DEBUG]
  107.  
  108.             OR  VIDTYPE [+E] [+DRVC] [DEBUG]
  109.  
  110.             OR  VIDTYPE [+E] [+DRVD] [DEBUG]
  111.  
  112.  
  113.  
  114.        Format:  (For printout of on-line help and chart)
  115.  
  116.                 VIDTYPE NP > PRN
  117.                 (Prints with no pause)
  118.  
  119.  
  120.  
  121.  
  122.         Variable name :  This is the user-defined name that will be used
  123.                          for the video-adapter DOS variable, provided
  124.                          the -V option isn't used.  When a video-adapter
  125.                          DOS variable is used, row and column DOS
  126.                          variables will automatically be created in
  127.                          addition to the video-adapter variable,
  128.                          provided the -RC option is not used.
  129.  
  130.           -V :  This option tells the program not to use video-adapter
  131.                 detection at all.  (The default setting is for
  132.                 video-adapter detection to be used.)
  133.  
  134.          -RC :  This option tells the program not to use row & column
  135.                 detection.  Can use when video-adapter detection is
  136.                 used.
  137.  
  138.          +RC :  This option tells the program to use row & column
  139.                 detection.  Can use when video-adapter detection not
  140.                 used.
  141.  
  142.           +E :  This option tells the program to set an errorlevel
  143.                 instead of setting DOS variables.
  144.  
  145.           +S :  This option will cause VIDTYPE to assign a shorter
  146.                 description to the video-adapter DOS variable (shown in
  147.                 the chart displayed in the on-line help).
  148.  
  149.           +P :  This option tells the program to prompt the user when a
  150.                 CGA adapter is detected in order to find out whether a
  151.                 multi-color monitor or single-color monitor is hooked
  152.                 up.
  153.  
  154.         +SYS :  This option tells the program to include system
  155.                 detection.  If the +E isn't used, a variable called
  156.                 SYS will be created with its system description.
  157.  
  158.         +CPU :  This option tells the program to include CPU detection.
  159.                 If the +E option isn't used, a variable called CPU will
  160.                 be created with its CPU description.
  161.  
  162.         +VER :  This option tells the program to include the DOS-version
  163.                 detection.  If the +E option isn't used, a variable
  164.                 called _DOSVER will be created with its DOS-version
  165.                 description.
  166.  
  167.          +SV :  This option will cause VIDTYPE to create a shorter
  168.                 DOS variable for the DOS-version, called VER.
  169.  
  170.         +KBD :  This option tells the program to include detection for
  171.                 the type keyboard used (83/84-key style, AT style,
  172.                 Enhanced style).  If the +E option isn't used, a
  173.                 variable called KBD will be created with its
  174.                 keyboard-style description.
  175.  
  176.         +ENV :  This option tells the program to include the DOS
  177.                 environment free-space detection.  If the +E option
  178.                 isn't used, a variable called ENV will be created with
  179.                 its free-bytes-of-environment-space description.
  180.  
  181.        +TENV :  This option tells the program to include the DOS
  182.                 total-environment space detection.  If the +E option
  183.                 isn't used, a variable called TENV will be created with
  184.                 its total-bytes-of-environment-space description.
  185.  
  186.         +DRVA,
  187.         +DRVB,
  188.         +DRVC,
  189.         +DRVD :  Either of these options tells the program to include
  190.                  disk drive detection for drives A, B, C, and/or D.  If
  191.                  the +E option isn''t used, then, depending on the
  192.                  option(s) used, a combination of variables called A, B,
  193.                  C, and/or D are created with the drive type/size
  194.                  description for each.
  195.  
  196.  
  197.        ========== DETECTION PRIORITY WHEN USING ERRORLEVELS ============
  198.  
  199.          Priority, here, means the ability of an option to overide or
  200.          over-power other options.  An option of higher priority will
  201.          cut off the use of options in lower priorities when using
  202.          errorlevels (the +E option).  (+S and +SV are ignored with
  203.          errorlevels.)
  204.  
  205.          1st(highest) priority option(s) : DRVA
  206.          2nd priority option(s)          : DRVB
  207.          3rd priority option(s)          : DRVC
  208.          4th priority option(s)          : DRVD
  209.          5th priority option(s)          : TENV
  210.          6th priority option(s)          : ENV
  211.          7th priority option(s)          : KBD
  212.          8th priority option(s)          : VER
  213.          9th priority option(s)          : SYS, CPU
  214.         10th(lowest) priority option(s)  : Variable name, -V, -RC, +RC,
  215.                                            +P
  216.  
  217.  
  218.  
  219.        ========== DETECTION PRECEDENCE WHEN USING VARIABLES ============
  220.  
  221.          Precedence, here, means which options will be done first.  A
  222.          variable of higher precedence will be set before a variable of
  223.          lower precedence.  Therefore, if there's not enough environment
  224.          space left for all of the variables desired, those of the
  225.          lowest precedence will usually be the ones to lose their
  226.          chance of being used.
  227.  
  228.          1st(highest) precedence option(s) : Variable name, -V, +S, +P
  229.          2nd precedence option(s)          : -RC, +RC
  230.          3th precedence option(s)          : +SYS, +CPU
  231.          4th precedence option(s)          : +VER, +SV
  232.          5th precedence option(s)          : +KBD
  233.          6th precedence option(s)          : +ENV
  234.          7th precedence option(s)          : +TENV
  235.          8th precedence option(s)          : +DRVA
  236.          9th precedence option(s)          : +DRVB
  237.         10th precedence option(s)          : +DRVC
  238.         11th(lowest) precedence option(s)  : +DRVD
  239.  
  240.  
  241.  
  242.        ==================== SOME DETECTION EXAMPLES ====================
  243.  
  244.        -----------------------
  245.        VIDEO-ADAPTER DETECTION:
  246.        -----------------------
  247.  
  248.        Say you want to call Lotus 123 where the default set-file is
  249.        called 123.SET and your set-file for using a CGA video-adapter is
  250.        called CGACOLOR.SET . . .
  251.  
  252.  
  253.          --------------------------------------------------
  254.          EXAMPLE for using a DOS variable for video-adapter:
  255.          --------------------------------------------------
  256.  
  257.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  258.            in order to set up a DOS environment variable that holds a
  259.            description of the video-adapter type:
  260.  
  261.            VIDTYPE VIDEO
  262.  
  263.               VIDTYPE will create a DOS environment variable called
  264.               VIDEO and give it a string value that describes the type
  265.               of video-adapter your system is using, according to the
  266.               VIDTYPE chart.  (Get a printout of the chart by typing
  267.               VIDTYPE NP > PRN.)  It will also create two other DOS
  268.               variables called ROW and COL that give the current number
  269.               of rows and columns being used, respectively.
  270.  
  271.  
  272.          - Now you can write another batch file to use for calling Lotus
  273.            123.
  274.  
  275.            Example:  IF %VIDEO% == CGACOLOR  COPY CGACOLOR.SET 123.SET
  276.                      IF %VIDEO% . . . . . . .
  277.                      IF %VIDEO% . . . . . . .
  278.                      123
  279.  
  280.               This calls Lotus 123 after copying the needed set-file to
  281.               the default set-file.
  282.  
  283.               OR if your application can be called along with the name
  284.               of the desired set-file (or driver-file) you can be more
  285.               clever in your batch file.
  286.  
  287.            Example:  123 %VIDEO%
  288.  
  289.               This calls Lotus 123 and tells it to use the string value
  290.               in the VIDEO variable as the actual set-file name to be
  291.               used. I.e.  If VIDEO has the string value CGACOLOR, Lotus,
  292.               which assumes that the file name has .SET as its
  293.               extension, will use CGACOLOR.SET as its set-file.
  294.  
  295.               NOTE: If the +S option was used, the string would have
  296.               been CGA instead of CGACOLOR.  This could let the variable
  297.               serve as a prefix to a file-name.  I.e.  If you had a
  298.               set-file called CGA123.SET, you could type 123 %VIDEO%123
  299.               which would be translated as 123 CGA123.SET.
  300.  
  301.               NOTE: If you need to know the current row and column mode
  302.               that the system is using, just access the ROW and COL
  303.               variables in the same way you accessed the VIDEO variable;
  304.               i.e.  IF %ROW% == . . . .
  305.                     IF %COL% == . . . .
  306.  
  307.  
  308.          NOTE: I have found that if you are using one of the many DOS
  309.          shell programs available, you may encounter a problem when
  310.          running a batch file that tries to access the DOS variables,
  311.          while in the DOS shell program.  It may not recognize these
  312.          variables as part of the "current" DOS environment since the
  313.          variables are in the "master" environment.  This problem can be
  314.          solved by not running the batch file while in the DOS shell
  315.          program.  Just run it out in plain ole DOS (the "master"
  316.          environment).  Also, I am currently working on a way to
  317.          overcome that problem and, if successful, will include the
  318.          remedy in one of the future versions.
  319.  
  320.          NOTE: The % symbol or the ERRORLEVEL statement, when used with
  321.          the IF statement, will not work right when used directly at the
  322.          DOS prompt.  You must use them in a batch file.
  323.  
  324.  
  325.          -------------------------------------------------
  326.          EXAMPLE for using an errorlevel for video-adapter:
  327.          -------------------------------------------------
  328.  
  329.          - You can write a batch file to use for calling Lotus 123 where
  330.            VIDTYPE is called earlier in the same batch file instead of
  331.            in your autoexec.bat file:
  332.  
  333.            VIDTYPE +E
  334.  
  335.            - VIDTYPE will abstain from using variables for the
  336.              video-adapter/row/col detection and will instead create an
  337.              errlorlevel value that describes the type of video-adapter
  338.              and row/col mode your system is using, according to the
  339.              VIDTYPE chart.  (Get a printout of the chart by typing
  340.              VIDTYPE NP > PRN.)
  341.  
  342.            - Then, the remaining lines in your batch file could look
  343.              like this:
  344.  
  345.              IF NOT ERRORLEVEL 3 GOTO 2
  346.              COPY CGACOLOR.SET 123.SET
  347.              GOTO GO
  348.              :2
  349.              IF NOT ERRORLEVEL 2 GOTO 1
  350.              COPY . . . . .
  351.              GOTO GO
  352.              :1
  353.              IF NOT ERRORLEVEL 1 GOTO GO
  354.              COPY . . . . .
  355.              :GO
  356.              123
  357.  
  358.            - This calls Lotus 123 after copying the needed set-file to
  359.              the default set-file.
  360.  
  361.            - OR if your application can be called along with the name of
  362.              the desired set-file (or driver-file) your batch file could
  363.              look like this:
  364.  
  365.              IF NOT ERRORLEVEL 3 GOTO 2
  366.              123 CGACOLOR
  367.              GOTO END
  368.              :2
  369.              IF NOT ERRORLEVEL 2 GOTO 1
  370.              123 . . . .
  371.              GOTO END
  372.              :1
  373.              IF NOT ERRORLEVEL 1 GOTO END
  374.              123 . . . .
  375.              :END
  376.  
  377.            - This calls Lotus 123 after testing the errorlevel and tells
  378.              it to use the actual set-file name to be used.  So, if
  379.              ERRORLEVEL is 3, then, according to the VIDTYPE chart, the
  380.              video equipment being used is CGA color.  Lotus, which
  381.              assumes that the file name has .SET as its extension, will
  382.              use CGACOLOR.SET as its set-file.
  383.  
  384.            NOTE: If the row/col mode is anything other than the standard
  385.            25 by 80 mode, the errorlevels will be different for each of
  386.            the above video-adapter types.  Please refer to the VIDTYPE
  387.            chart.
  388.  
  389.            NOTE:  On testing errorlevels in a batch file, test in
  390.            descending order from highest to lowest and when one is
  391.            found, avoid testing the rest of the IF ERRORLEVEL statements
  392.            because they, too, will be found to be true.  The reason for
  393.            this is that when an errorlevel is set in DOS, what is
  394.            actually being reported, is that the errorlevel value is the
  395.            highest errorlevel to be found.  So all ERRORLEVEL values
  396.            lower than that will be true, also.  Therefore, be prepared
  397.            to use the GOTO statement a lot when testing a series of
  398.            errorlevels.
  399.  
  400.  
  401.        -------------------------------------------
  402.        PROMPTED MONITOR DETECTION FOR CGA ADAPTERS:
  403.        -------------------------------------------
  404.  
  405.          Since there is no known way of detecting the actual type of
  406.          monitor hooked up to your adapter, multi-color monitors and
  407.          single-color monitors are not automatically distinguished.  So
  408.          the need for user prompting is evident when the monitor type
  409.          needs to be known.  Currently, the program only has the option
  410.          to prompt at CGA adapter detection.
  411.  
  412.          One use is when you have a CGA adapter that fails to produce
  413.          legible text on a single-color monitor and you need to call
  414.          MODE BW80 for black and white mode.  In that situation, do the
  415.          following:
  416.  
  417.              1. When you are prompted, respond with an "S", showing that
  418.                 you have a single-color monitor.
  419.  
  420.              2. Any time later, when accessing the video-adapter
  421.                 variable, it will reveal that you have a single-color
  422.                 monitor.
  423.  
  424.              3. With this information, your batch file can call MODE
  425.                 BW80 and set the system to black and white mode.
  426.  
  427.  
  428.          ------------------------------------------------------------
  429.          EXAMPLE for using a DOS variable for video-adapter type with
  430.          prompting:
  431.          ------------------------------------------------------------
  432.  
  433.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  434.            in order to set up a DOS environment variable that holds a
  435.            description of the video-adapter type and to prompt the user
  436.            whenever a CGA adapter is detected:
  437.  
  438.            VIDTYPE VIDEO +P
  439.  
  440.               VIDTYPE will create a DOS environment variable called
  441.               VIDEO and give it a string value that describes the type
  442.               of video-adapter your system is using, according to the
  443.               VIDTYPE chart.  If a CGA adapter is detected, it will
  444.               prompt the user to give the monitor type that is hooked up
  445.               to the adapter: i.e.
  446.  
  447.                    (M)ULTI COLOR MONITOR
  448.                    (S)INGLE COLOR MONITOR
  449.  
  450.                WHICH TYPE OF MONITOR DO YOU HAVE? >
  451.  
  452.               and will set the video-adapter variable accordingly.
  453.               Refer to the VIDTYPE chart.  (Get a printout of the chart
  454.               by typing VIDTYPE NP > PRN.)  VIDTYPE will also create two
  455.               other DOS variables called ROW and COL that give the
  456.               current number of rows and columns being used,
  457.               respectively.
  458.  
  459.          ---------------------------------------------------------
  460.          EXAMPLE for using an errorlevel with prompting and no DOS
  461.          variables:
  462.          ---------------------------------------------------------
  463.  
  464.          - You can write a batch file to use for calling Lotus 123 where
  465.            VIDTYPE is called earlier in the same batch file instead of
  466.            in your autoexec.bat file:
  467.  
  468.            VIDTYPE +P +E
  469.  
  470.            - VIDTYPE will abstain from using variables for the
  471.              video-adapter/row/col detection and will instead create an
  472.              errlorlevel value that describes the type of video-adapter
  473.              and row/col mode your system is using, according to the
  474.              VIDTYPE chart. (Get a printout of the chart by typing
  475.              VIDTYPE NP > PRN.)  If a CGA adapter is detected, it will
  476.              prompt the user to give the monitor type that is hooked up
  477.              to the adapter: i.e.
  478.  
  479.                    (M)ULTI COLOR MONITOR
  480.                    (S)INGLE COLOR MONITOR
  481.  
  482.                WHICH TYPE OF MONITOR DO YOU HAVE? >
  483.  
  484.              and will alter the errorlevel accordingly.  Refer to the
  485.              VIDTYPE chart.
  486.  
  487.  
  488.        ----------------
  489.        SYSTEM DETECTION:
  490.        ----------------
  491.  
  492.          ------------------------------------------------
  493.          EXAMPLE for using a DOS variable for system type:
  494.          ------------------------------------------------
  495.  
  496.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  497.            in order to set up a DOS environment variable that holds a
  498.            description of the system type:
  499.  
  500.            VIDTYPE +SYS
  501.  
  502.               VIDTYPE will create a pre-designated DOS environment
  503.               variable called SYS and give it a string value that
  504.               describes the type of system you are using, according to
  505.               the VIDTYPE chart.  If no known system type is detected,
  506.               the actual number(s) found in the memory address of the
  507.               machine is given to the variable.  (Get a printout of the
  508.               chart by typing VIDTYPE NP > PRN.)
  509.  
  510.          ----------------------------------------------------------
  511.          EXAMPLE for using an errorlevel for system type and no DOS
  512.          variables:
  513.          ----------------------------------------------------------
  514.  
  515.          - You can write a batch file where VIDTYPE is called just
  516.            before calling your application in order to detect the system
  517.            type.  NOTE: When using the errorlevel option, system
  518.            detection will not allow for other detections of lower
  519.            priority, simultaneously.  In order to get the other
  520.            detections, you must call VIDTYPE separately for them.
  521.            Suggested examples for this are in the example section later
  522.            in this document.
  523.  
  524.            VIDTYPE +SYS +E
  525.  
  526.            - VIDTYPE will abstain from using video-adapter/row/col
  527.              detection at all and will create an errlorlevel value that
  528.              describes the type of system you are using, according to
  529.              the VIDTYPE chart.  If no known system type is detected,
  530.              the number 17 is given as the errorlevel value.  (Get a
  531.              printout of the chart by typing VIDTYPE NP > PRN.)
  532.  
  533.  
  534.        -------------
  535.        CPU DETECTION:
  536.        -------------
  537.  
  538.          ---------------------------------------------
  539.          EXAMPLE for using a DOS variable for CPU type:
  540.          ---------------------------------------------
  541.  
  542.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  543.            in order to set up a DOS environment variable that holds a
  544.            description of the CPU type:
  545.  
  546.            VIDTYPE +CPU
  547.  
  548.               VIDTYPE will create a pre-designated DOS environment
  549.               variable called CPU and give it a string value that
  550.               describes the type of CPU you are using, according to the
  551.               VIDTYPE chart.  If no known CPU type is detected, the
  552.               actual number found in the memory address of the machine
  553.               is given to the variable.  (Get a printout of the chart by
  554.               typing VIDTYPE NP > PRN.)
  555.  
  556.          -------------------------------------------------------
  557.          EXAMPLE for using an errorlevel for CPU type and no DOS
  558.          variables:
  559.          -------------------------------------------------------
  560.  
  561.          - You can write a batch file where VIDTYPE is called just
  562.            before calling your application in order to detect the CPU
  563.            type.  NOTE: When using the errorlevel option, CPU detection
  564.            will not allow for other detections of lower priority,
  565.            simultaneously.  In order to get the other detections, you
  566.            must call VIDTYPE separately for them.  Suggested examples
  567.            for this are in the example section later in this document.
  568.  
  569.            VIDTYPE +CPU +E
  570.  
  571.            - VIDTYPE will abstain from using video-adapter/row/col
  572.              detection at all and will create an errlorlevel value that
  573.              describes the type of CPU you are using, according to the
  574.              VIDTYPE chart.  If no known CPU type is detected, the
  575.              number 120 is added to the errorlevel value.  (Get a
  576.              printout of the chart by typing VIDTYPE NP > PRN.)
  577.  
  578.  
  579.        ---------------------
  580.        DOS-VERSION DETECTION:
  581.        ---------------------
  582.  
  583.          ------------------------------------------------
  584.          EXAMPLE for using a DOS variable for DOS-version:
  585.          ------------------------------------------------
  586.  
  587.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  588.            in order to set up a DOS environment variable that holds a
  589.            description of the DOS-version:
  590.  
  591.            VIDTYPE +VER
  592.  
  593.               VIDTYPE will create a pre-designated DOS environment
  594.               variable called _DOSVER and give it a string value that
  595.               describes the DOS-version you are using, according to the
  596.               VIDTYPE chart.  (Get a printout of the chart by typing
  597.               VIDTYPE NP > PRN.)
  598.  
  599.            OR
  600.  
  601.            VIDTYPE +VER +SV
  602.  
  603.               VIDTYPE will create a shorter pre-designated DOS
  604.               environment variable called VER and give it a string value
  605.               that describes the DOS-version you are using, according to
  606.               the VIDTYPE chart.  (Get a printout of the chart by typing
  607.               VIDTYPE NP > PRN.)
  608.  
  609.          -------------------------------------------------------
  610.          EXAMPLE for using an errorlevel for DOS-version and no
  611.          DOS variables:
  612.          -------------------------------------------------------
  613.  
  614.          - You can write a batch file where VIDTYPE is called just
  615.            before calling your application in order to detect the DOS
  616.            version.  NOTE: When using the errorlevel option, DOS-version
  617.            detection will not allow for other detections of lower
  618.            priority, simultaneously.  In order to get the other
  619.            detections, you must call VIDTYPE separately for them.
  620.            Suggested examples for this are in the example section later
  621.            in this document.
  622.  
  623.            VIDTYPE +VER +E
  624.  
  625.            - VIDTYPE will abstain from using any other detection and
  626.              will create an errlorlevel value that describes the DOS
  627.              version being used according to the VIDTYPE chart.  (Get a
  628.              printout of the chart by typing VIDTYPE NP > PRN.)
  629.  
  630.  
  631.        -----------------------
  632.        KEYBOARD TYPE DETECTION:
  633.        -----------------------
  634.  
  635.          --------------------------------------------------
  636.          EXAMPLE for using a DOS variable for keyboard type:
  637.          --------------------------------------------------
  638.  
  639.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  640.            in order to set up a DOS environment variable that holds a
  641.            description of the keyboard type:
  642.  
  643.            VIDTYPE +KBD
  644.  
  645.               VIDTYPE will create a pre-designated DOS environment
  646.               variable called KBD and give it a string value that
  647.               describes the keyboard type you are using, according to
  648.               the VIDTYPE chart.  (Get a printout of the chart by typing
  649.               VIDTYPE NP > PRN.)
  650.  
  651.          -----------------------------------------------------
  652.          EXAMPLE for using an errorlevel for keyboard type and 
  653.          no DOS variables:
  654.          -----------------------------------------------------
  655.  
  656.          - You can write a batch file where VIDTYPE is called just
  657.            before calling your application in order to detect the
  658.            keyboard type used.  NOTE: When using the errorlevel option,
  659.            keyboard type detection will not allow for other detections
  660.            of lower priority, simultaneously.  In order to get the
  661.            other detections, you must call VIDTYPE separately for them.
  662.            Suggested examples for this are in the example section later
  663.            in this document.
  664.  
  665.            VIDTYPE +KBD +E
  666.  
  667.            - VIDTYPE will abstain from using any other detection and
  668.              will create an errlorlevel value that describes the
  669.              keyboard type being used according to the VIDTYPE chart.
  670.              (Get a printout of the chart by typing VIDTYPE NP > PRN.)
  671.  
  672.  
  673.        --------------------------------
  674.        ENVIRONMENT FREE-SPACE DETECTION:
  675.        --------------------------------
  676.  
  677.          -----------------------------------------------------------
  678.          EXAMPLE for using a DOS variable for free environment space:
  679.          -----------------------------------------------------------
  680.  
  681.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  682.            in order to set up a DOS environment variable that holds a
  683.            description of the free environment space:
  684.  
  685.            VIDTYPE +ENV
  686.  
  687.               VIDTYPE will create a pre-designated DOS environment
  688.               variable called ENV and give it a string value that
  689.               describes the free bytes of environment space, according
  690.               to the VIDTYPE chart.  (Get a printout of the chart by
  691.               typing VIDTYPE NP > PRN.)
  692.  
  693.          ----------------------------------------------------------
  694.          EXAMPLE for using an errorlevel for free environment space
  695.          and no DOS variables:
  696.          ----------------------------------------------------------
  697.  
  698.          - You can write a batch file where VIDTYPE is called just
  699.            before calling your application in order to detect the free
  700.            environment space.  NOTE: When using the errorlevel option,
  701.            environment space detection will not allow for other
  702.            detections of lower priority, simultaneously.  In order to
  703.            get the other detections, you must call VIDTYPE separately
  704.            for them.  Suggested examples for this are in the example
  705.            section later in this document.
  706.  
  707.            VIDTYPE +ENV +E
  708.  
  709.            - VIDTYPE will abstain from using any other detection and
  710.              will create an errlorlevel value that describes the free
  711.              bytes of environment space according to the VIDTYPE chart.
  712.              (Get a printout of the chart by typing VIDTYPE NP > PRN.)
  713.  
  714.  
  715.        ---------------------------------
  716.        ENVIRONMENT TOTAL-SPACE DETECTION:
  717.        ---------------------------------
  718.  
  719.          ------------------------------------------------------------
  720.          EXAMPLE for using a DOS variable for total environment space:
  721.          ------------------------------------------------------------
  722.  
  723.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  724.            in order to set up a DOS environment variable that holds a
  725.            description of the total environment space:
  726.  
  727.            VIDTYPE +TENV
  728.  
  729.               VIDTYPE will create a pre-designated DOS environment
  730.               variable called TENV and give it a string value that
  731.               describes the total bytes of environment space, according
  732.               to the VIDTYPE chart.  (Get a printout of the chart by
  733.               typing VIDTYPE NP > PRN.)
  734.  
  735.          -----------------------------------------------------------
  736.          EXAMPLE for using an errorlevel for total environment space
  737.          and no DOS variables:
  738.          -----------------------------------------------------------
  739.  
  740.          - You can write a batch file where VIDTYPE is called just
  741.            before calling your application in order to detect the total
  742.            environment space.  NOTE: When using the errorlevel option,
  743.            total environment space detection will not allow for other
  744.            detections of lower priority, simultaneously.  In order to
  745.            get the other detections, you must call VIDTYPE separately
  746.            for them.  Suggested examples for this are in the example
  747.            section later in this document.
  748.  
  749.            VIDTYPE +TENV +E
  750.  
  751.            - VIDTYPE will abstain from using any other detection and
  752.              will create an errlorlevel value that describes the total
  753.              bytes of environment space according to the VIDTYPE chart.
  754.              (Get a printout of the chart by typing VIDTYPE NP > PRN.)
  755.  
  756.  
  757.        ------------------------------
  758.        DISK DRIVE TYPE/SIZE DETECTION:
  759.        ------------------------------
  760.  
  761.          ----------------------------------------------------
  762.          EXAMPLE for using DOS variables for disk types/sizes:
  763.          ----------------------------------------------------
  764.  
  765.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  766.            in order to set up DOS environment variables that hold
  767.            descriptions of the disk drive types and sizes:
  768.  
  769.            VIDTYPE +DRVA [+DRVB] [+DRVC] [+DRVD]
  770.  
  771.               VIDTYPE will create pre-designated DOS environment
  772.               variable(s) called A, B, C, and/or D and give
  773.               it/them string values that describe the disk drive
  774.               types and sizes, according to the VIDTYPE chart.
  775.               (Get a printout of the chart by typing VIDTYPE NP >
  776.               PRN.)
  777.  
  778.          ---------------------------------------------------------
  779.          EXAMPLE for using an errorlevel for the disk drive types/
  780.          sizes and no DOS variables:
  781.          ---------------------------------------------------------
  782.  
  783.          - You can write a batch file where VIDTYPE is called just
  784.            before calling your application in order to detect the disk
  785.            drive types/sizes.  NOTE: When using the errorlevel option,
  786.            disk drive type/size detection will not allow for other
  787.            detections of lower priority, simultaneously.  In order to
  788.            get the other detections, you must call VIDTYPE separately
  789.            for them.  Suggested examples for this are in the example
  790.            section later in this document.
  791.  
  792.            VIDTYPE +DRVA +E
  793.  
  794.            OR VIDTYPE +DRVB +E
  795.  
  796.            OR VIDTYPE +DRVC +E
  797.  
  798.            OR VIDTYPE +DRVD +E
  799.  
  800.            - VIDTYPE will abstain from using any other detection
  801.              and will create an errlorlevel value that describes
  802.              the disk drive type & size for one, only, of drive
  803.              A, B, C, or D, according to the VIDTYPE chart. (Get
  804.              a printout of the chart by typing VIDTYPE NP > PRN.)
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.        -----------------------------------------
  813.        COMBINATIONS OF SOME OF THE ABOVE OPTIONS:
  814.        -----------------------------------------
  815.  
  816.          --------
  817.          EXAMPLES:
  818.          --------
  819.  
  820.            VIDTYPE VID +S +P              Creates a video-adapter DOS
  821.                                           variable, called VID, and
  822.                                           gives a shortened description
  823.                                           string to it.  And if it
  824.                                           detects a CGA adapter, it will
  825.                                           prompt the user for the
  826.                                           monitor type and alter the
  827.                                           vide-adapter string
  828.                                           accordingly.  Two other
  829.                                           variables, ROW and COL, will
  830.                                           be created, too, with their
  831.                                           row and column values.
  832.                                           
  833.            VIDTYPE VIDEO -RC              Creates a video-adapter DOS
  834.                                           variable, called VIDEO, giving
  835.                                           the standard long description
  836.                                           string to it.  The two
  837.                                           variables, ROW and COL, will
  838.                                           not be created.
  839.  
  840.            VIDTYPE +SYS                   Refrains from using
  841.                                           video-adapter/row/col
  842.                                           variables and only creates the
  843.                                           DOS variable, SYS, with a
  844.                                           description of the type system
  845.                                           being used.
  846.  
  847.            VIDTYPE +E                     Refrains from using variables
  848.                                           for the video-adapter/row/col
  849.                                           detection and sets an
  850.                                           errorlevel instead, for the
  851.                                           video-adapter type and row &
  852.                                           col mode.
  853.  
  854.            VIDTYPE +E +P                  Refrains from using variables
  855.                                           for the video-adapter/row/col
  856.                                           detection, sets an errorlevel
  857.                                           instead, for video-adapter
  858.                                           type and row/col mode, and if
  859.                                           a CGA adapter is detected, it
  860.                                           prompts the user for the
  861.                                           monitor type used and alters
  862.                                           the errorlevel accordingly.
  863.  
  864.            VIDTYPE -V +RC +E              Only creates an errorlevel for
  865.                                           the row & col mode.  No
  866.                                           video-adapter detection is
  867.                                           used since the -V option was
  868.                                           given.
  869.  
  870.            VIDTYPE +SYS +CPU              Refrains from using
  871.                                           video-adapter/row/col
  872.                                           detection and creates the
  873.                                           variable, SYS, with a
  874.                                           description of the type system
  875.                                           being used and the variable
  876.                                           CPU, with a description of the
  877.                                           type CPU being used.
  878.  
  879.            VIDTYPE VID +S -RC +CPU        Creates a video-adapter DOS
  880.                                           variable, called VID, giving a
  881.                                           shortened description string
  882.                                           to it.  It refrains from
  883.                                           creating the two other
  884.                                           variables, ROW and COL
  885.                                           variables, since the -RC turns
  886.                                           that capability off (useful
  887.                                           for saving environment space).
  888.                                           It also creates the variable,
  889.                                           CPU, with a description of the
  890.                                           type CPU being used.
  891.  
  892.            VIDTYPE +RC                    Only creates the DOS
  893.                                           variables, ROW & COL, with a
  894.                                           description of the row &
  895.                                           column mode being used.  No
  896.                                           video-adapter variable is
  897.                                           created since no variable name
  898.                                           was given.
  899.  
  900.            VIDTYPE VID +S +CPU +VER       Creates a video-adapter DOS
  901.                                           variable, called VID, giving a
  902.                                           shortened description string
  903.                                           to it.  Two other variables,
  904.                                           ROW and COL, will be created,
  905.                                           too, with their row and column
  906.                                           values.  It also creates the
  907.                                           variable, CPU, with a
  908.                                           description of the type CPU
  909.                                           being used.  Finally, it
  910.                                           creates the variable, _DOSVER,
  911.                                           with a description of the DOS
  912.                                           version being used.
  913.  
  914.            VIDTYPE +VER +SV +TENV         Creates a shortened DOS-
  915.                                           version DOS variable, called
  916.                                           VER, with a description of the
  917.                                           DOS-version being used.  It
  918.                                           also creates the variable,
  919.                                           TENV, with a description of
  920.                                           the total bytes for the master
  921.                                           DOS environment.
  922.  
  923.            VIDTYPE +DRVA +DRVB +DRVC      Creates the DOS variables, A, B,
  924.                                           & C with the descriptions of the
  925.                                           disk drive type & size for each
  926.                                           of those drives. No
  927.                                           video-adapter variable is
  928.                                           created since no variable name
  929.                                           was given.
  930.                                           
  931.            VIDTYPE +ENV +E                Refrains from using any
  932.                                           other type of detection and
  933.                                           sets an errorlevel for the
  934.                                           free bytes of environment
  935.                                           space.
  936.  
  937.            VIDTYPE +KBD +E                Refrains from using any
  938.                                           other type of detection and
  939.                                           sets an errorlevel for the
  940.                                           type of keyboard used.
  941.  
  942.            VIDTYPE +DRVA +E               Refrains from using any
  943.                                           other type of detection and
  944.                                           sets an errorlevel for the
  945.                                           drive type & size for drive
  946.                                           A:.
  947.  
  948.  
  949.            ----------------------------------------------------------
  950.            WHEN USING ERRORLEVELS, THE FOLLOWING COMBINATIONS ARE NOT
  951.            ALLOWED :
  952.            ----------------------------------------------------------
  953.  
  954.            VIDTYPE +E +SYS (and/or) Attempted errorlevel for system
  955.                    +CPU (with any   detection and/or CPU detection
  956.                    other option)    while using other detections.
  957.                        
  958.            VIDTYPE +E +VER (with    Attempted errorlevel for DOS
  959.                    any other        version detection while using
  960.                    option)          other detections.
  961.  
  962.            VIDTYPE +E +KBD (with    Attempted errorlevel for keyboard
  963.                    any other        detection while using other 
  964.                    option)          detections.
  965.  
  966.            VIDTYPE +E +ENV (with    Attempted errorlevel for DOS
  967.                    any other        environment free-space detection
  968.                    option)          while using other detections.
  969.  
  970.            VIDTYPE +E +TENV (with   Attempted errorlevel for DOS
  971.                    any other        total environment space detection
  972.                    option)          while using other detections.
  973.  
  974.            VIDTYPE +E +DRVA (with   Attempted errorlevel for disk
  975.                    any other        A-drive type/size detection while
  976.                    option)          using other detections.
  977.  
  978.            VIDTYPE +E +DRVB (with   Attempted errorlevel for disk
  979.                    any other        B-drive type/size detection while
  980.                    option)          using other detections.
  981.  
  982.            VIDTYPE +E +DRVC (with   Attempted errorlevel for disk
  983.                    any other        C-drive type/size detection while
  984.                    option)          using other detections.
  985.  
  986.            VIDTYPE +E +DRVD (with   Attempted errorlevel for disk
  987.                    any other        D-drive type/size detection while
  988.                    option)          using other detections.
  989.  
  990.  
  991.            REASON:  Because of the range limitations for DOS errorlevels
  992.            (255 max), VIDTYPE will refrain from setting errorlevels
  993.            higher than 255.  If VIDTYPE allowed a large variety of
  994.            detection options for errorlevel use, their would be so many
  995.            possible permutations that the resulting errorlevel could be
  996.            a value of several thousand and DOS "IF ERRORLEVEL"
  997.            statements do not work correctly with errorlevel values
  998.            higher than 255.
  999.  
  1000.            ULTIMATE REMEDY:  When using errorlevels, the suggested way
  1001.            to get the desired detection combinations above, since you
  1002.            can't do them all simultaneously, is to do the following:
  1003.            Say you want to get video-adapter, row/col, system, and CPU
  1004.            detection.  Write this in your batch file:
  1005.  
  1006.               1. Call VIDTYPE, using the errorlevel option, alone, for
  1007.                  video-adapter/row/col detection, only.
  1008.                  I.e.  VIDTYPE +E
  1009.  
  1010.               2. Test the errorlevels for the different
  1011.                  video-adapter/row/col combinations.
  1012.                  I.e.  IF ERRORLEVEL 3 ...
  1013.                        IF ERRORLEVEL 2 ...
  1014.  
  1015.               3. At the successful test, call another batch file, with a
  1016.                  parameter, to test for the other desired detections.
  1017.                  I.e.  IF ERRORLEVEL 3 CALL OTHER.BAT 3
  1018.                        IF ERRORLEVEL 2 CALL OTHER.BAT 2
  1019.  
  1020.               4. The other batch file could look like this:
  1021.  
  1022.                  rem ** OTHER.BAT **
  1023.                  VIDTYPE +E +SYS +CPU
  1024.                  IF ERRORLEVEL 95 IF %1 == 3 ECHO AT(8+ MHZ) 386 CGA 80x25
  1025.                  IF ERRORLEVEL 95 IF %1 == 2 ECHO AT(8+ MHZ) 386 MONO 80x25
  1026.                  IF ERRORLEVEL 64 IF %1 == 3 ECHO AT(6 MHZ)85 286 CGA 80x25
  1027.                  IF ERRORLEVEL 64 IF %1 == 2 ECHO AT(6 MHZ)85 286 MONO 80x25
  1028.                     (and so on)
  1029.  
  1030.               The same concept applies for the +VER, +KBD, +ENV, +TENV,
  1031.               and +DRV options.  You may possibly need a total of up to
  1032.               five batch files, depending on how large a variety of
  1033.               errorlevel detections are desired.
  1034.  
  1035.  
  1036.        ===================================================================
  1037.  
  1038.        There are some applications that contain automatic video-adapter
  1039.        and system detection for their own use, but since this is not the
  1040.        case for many applications, VIDTYPE becomes a very desirable
  1041.        utility, especially in a network environment that has different
  1042.        types of video equipment, system types, CPUs, DOS-versions,
  1043.        keyboards, and drives among its PC workstations.
  1044.  
  1045.        To get an on-screen chart of type descriptions and more how-to
  1046.        details, VIDTYPE will display some information of its own.  Just
  1047.        type VIDTYPE  (without any parameters).
  1048.  
  1049.        Thanks for using VIDTYPE,
  1050.          Vince Deegan, SERVITEK SOFTWARE
  1051.  
  1052.        ========================= VERSION HISTORY =========================
  1053.  
  1054.        Version 1.0
  1055.        - Had the ability to set the DOS variable and the option of
  1056.          displaying debugging information with the optional DEBUG
  1057.          parameter.
  1058.  
  1059.        Version 1.1
  1060.        - Added the ability to set a DOS errorlevel and two more
  1061.          parameter options: +E and -V for turning on the errorlevel
  1062.          mechanism and for turning off the video-adapter detection
  1063.          mechanism, respectively.  This addition was derived from the
  1064.          suggestion of Cris Moore.
  1065.  
  1066.        Version 1.2
  1067.        - Added the ability to opt for a shorter string length to the
  1068.          description assigned to the DOS variable; the +S option.
  1069.          Corrected a bug in detection of Hercules cards.
  1070.  
  1071.        Version 1.3
  1072.        - Correction on use with autoexec.bat files, where error messages
  1073.          occured, displaying that batch file information was lost.
  1074.  
  1075.        Version 1.4
  1076.        - Added options for detecting the current row/col mode, the
  1077.          system type, and user-prompt for monitor type with CGA
  1078.          adapters.
  1079.  
  1080.        Version 1.5
  1081.        - Added option for detecting the CPU type and changed numbering
  1082.          sequence for errorlevels.  Also added option for enabling or
  1083.          disabling row and column variables when more evnironment space
  1084.          is needed.
  1085.  
  1086.        Version 1.6
  1087.        - Attempted to correct an errorlevel bug without success.  Made
  1088.          some miscellaneous changes.
  1089.  
  1090.        Version 1.7
  1091.        - Next attempt to correct the errorlevel bug.  Added options
  1092.          for detecting DOS-version, free environment space, and keyboard
  1093.          type.
  1094.  
  1095.        Version 1.8
  1096.        - Changed default DOS-version variable to _DOSVER and added
  1097.          option for shortening the variable to VER.  Also added
  1098.          detection for total environment space.
  1099.  
  1100.        Version 1.81
  1101.        - Small aesthetic change and slight cutting of stack overhead.
  1102.  
  1103.        Version 1.9
  1104.        - Added detection for disk drive types and sizes.
  1105.  
  1106.        Version 1.91
  1107.        - Corrected error in detection of high density 5.25" floppies.
  1108.